﻿<?php
class Controller
{
	static function dieN($e)
	{
		echo("<pre style='color:#FFFFFF'>");
		print_r(var_dump($error));
		echo("</pre>");
		die();
	}
	
	static function createMenuItem($link,$title)
	{
		?>
		<li>
			<a href="<?php echo $link?>">
				<span><?php echo $title?></span>
			</a>
		</li>
		<?php 	
	}
}
class Model
{	
	static $link;
	static function connect()
	{
		try
		{
			Model::$link = mysql_connect("localhost","phutrung_mgroup","{.ndzmoG6hUn");
			mysql_select_db("phutrung_db",Model::$link);
		}
		catch (Exception $e)
		{
			Controller::dieN($e);
		}
	}
	
	static function disconnect()
	{
		mysql_close();
	}
}	
?>